

from tortoise.functions import Sum


from core import settings
from models import ProjectAuditRules

# 获取评审组规则的总分
async def getAuditRulesTotalPont(group_name: settings.ProjectGroupName):

    totalPoint = await ProjectAuditRules.filter(group_name=group_name).group_by("group_name").annotate(sum=Sum("max_point")).values("sum")
    
    
    return totalPoint[0]["sum"]